package com.xnyzc.lhy.didi.controller.other;

import com.xnyzc.lhy.common.entity.DiDiRv;
import com.xnyzc.lhy.didi.entity.param.other.InvalidNotifyParam;
import com.xnyzc.lhy.didi.entity.param.other.OtherOpenPidParam;
import com.xnyzc.lhy.didi.entity.param.other.ResponseRateParam;
import com.xnyzc.lhy.didi.service.other.OtherService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 其它
 * </p>
 *
 * @author wangshuo
 * @since 2019-10-06
 */
@RestController
@RequestMapping("oa/didi/other")
public class OtherController {

    @Autowired
    private OtherService otherService;

    /**
     * 乘客id查询
     *
     * @param otherOpenPidParam
     * @return
     */
    @ApiOperation(value = "乘客id查询", notes = "乘客id查询")
    @PostMapping(value = "/getOpenPid")
    public DiDiRv getOpenPid(@ApiParam(name =
            "closeOrderParam", value = "乘客id查询") @RequestBody OtherOpenPidParam otherOpenPidParam) {
        return otherService.getOpenPid(otherOpenPidParam);
    }

    /**
     * 发票冲红回调
     *
     * @param invalidNotifyParam
     * @return
     */
    @ApiOperation(value = "发票冲红回调", notes = "发票冲红回调")
    @PostMapping(value = "/getInvalidNotify")
    public DiDiRv getInvalidNotify(@ApiParam(name =
            "invalidNotifyParam", value = "发票冲红回调") InvalidNotifyParam invalidNotifyParam) {
        return otherService.getInvalidNotify(invalidNotifyParam);
    }


    /**
     * 应答率
     *
     * @param responseRateParam
     * @return
     */
    @ApiOperation(value = "应答率", notes = "发票冲红回调")
    @PostMapping(value = "/getResponseRate")
    public DiDiRv getResponseRate(@ApiParam(name =
            "invalidNotifyParam", value = "应答率") ResponseRateParam responseRateParam) {
        return otherService.getResponseRate(responseRateParam);
    }

}
